package com.vader.boot.bean;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author Vader
 * @date 2022/5/10
 **/
@Component
@Slf4j
public class LifeCycleBean {

    public LifeCycleBean(){
        log.info("construct_bean");
    }

    @Autowired
    public void autowire(){
        log.info("autowired_import:{}","/Users/kaivader/Library/Java/JavaVirtualMachines/azul-1.8.0_322/Contents/Home");
    }

    @PostConstruct
    public void init(){
        log.info("bean_init");
    }

    @PreDestroy
    public void destroy(){
        log.info("bean_destroy");
    }
}
